
//
//  Common.swift
//  liveDemo
//
//  Created by satoshi_uma on 2020/10/20.
//  Copyright © 2020 satoshi_uma. All rights reserved.
//

import UIKit

//------------ 获取画iPhone nav和tabbar高度 -----------
/// 屏幕宽
let SCREEN_WIDTH = (UIScreen.main.bounds.size.width)
/// 屏幕高
let SCREEN_HEIGHT = (UIScreen.main.bounds.size.height)

/// 判断设备
let mc_Is_iphone =  (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.phone)
let mc_Is_iphoneX = (SCREEN_WIDTH >= 375.0 && SCREEN_HEIGHT >= 812.0 && mc_Is_iphone)

/// 状态栏 和 导航栏 的总高度
let mcNavBarAndStatusBarHeight = (CGFloat)(mc_Is_iphoneX ? (44.0 + 44.0) : (20.0 + 44.0))
/// TabBar 和 安全距离 的总高度
let mcTabBarHeight = (CGFloat)(mc_Is_iphoneX ? (49.0 + 34.0) : (49.0 + 0.0))

/// 状态栏 高度
let mcNavBarSafeAreaHeight = (CGFloat)(mc_Is_iphoneX ? (44.0) : (20.0))
/// Tabbar 安全距离 高度
let mcTabbarSafeAreaHeight = (CGFloat)(mc_Is_iphoneX ? (34.0) : (0.0))

/// 导航栏 高度
let mcNavBarHeight = 44

/// Nav 和 Tabbar 总高度
let mcNavAndTabHeight = (mcNavBarAndStatusBarHeight + mcTabBarHeight)

